#import "WonderVelvetController.h"
        
#import "WonderVelvetModel.h"
#import "WonderVelvetCell.h"
#import "Masonry.h"

@interface WonderVelvetController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *zebraUnwindCollectionView;
@property (nonatomic, strong) NSMutableArray *noodleDataSource;

@end

@implementation WonderVelvetController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self flourishElevateConfigsui];
	[self odysseyIlluminategetData];
}


//: 懒加载数据模型数组
- (NSMutableArray *)noodleDataSource {
	if (!_noodleDataSource) {
		_noodleDataSource = [NSMutableArray array];
	}
	return _noodleDataSource;
}

//: 获取数据模型
- (void)odysseyIlluminategetData {
	
}

- (void)flourishElevateConfigsui {
    UICollectionViewFlowLayout *vowPirateJuggle = [[UICollectionViewFlowLayout alloc] init];
    vowPirateJuggle.minimumLineSpacing = 10;
    vowPirateJuggle.minimumInteritemSpacing = 10;
    vowPirateJuggle.itemSize = CGSizeMake(100, 100);
    vowPirateJuggle.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.zebraUnwindCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:vowPirateJuggle];
    self.zebraUnwindCollectionView.backgroundColor = UIColor.clearColor;
    self.zebraUnwindCollectionView.delegate = self;
    self.zebraUnwindCollectionView.dataSource = self;
    self.zebraUnwindCollectionView.showsHorizontalScrollIndicator = NO;
    self.zebraUnwindCollectionView.showsVerticalScrollIndicator = NO;
    [self.zebraUnwindCollectionView registerClass:[WonderVelvetCell class] forCellWithReuseIdentifier:NSStringFromClass([WonderVelvetCell class])];
    
    [self.view addSubview:self.zebraUnwindCollectionView];
    [self.zebraUnwindCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.noodleDataSource.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    WonderVelvetCell *rippleZenith = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([WonderVelvetCell class]) forIndexPath:indexPath];
    return rippleZenith;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
